eCircuit Center SPICE Basics
About SPICE |
SPICE Basics |
Running SPICE |
CIRCUIT COLLECTION
SPICE Commands |
SPICE Downloads |
About |
Contact |
Home
WHAT IS SPICE?
SPICE is program that simulates electronic circuits on your PC. You can view any voltage or current waveform in your circuit. SPICE calculates these voltages and currents versus time (Transient Analysis) or versus frequency (AC Analysis). Most SPICE programs also perform other analysis like DC, Sensitivity, Noise and Distortion.
SPICE stands for Simulation
Program with Integrated
Circuit Emphasis.
Researchers at the University of California, Berkeley
developed this computer program during the mid-70s. What drove this
development? The arrival of the integrated circuit demanded a method to test
and tweak circuit designs before the expensive fabrication process.
Today, SPICE is available from many vendors who have added schematic drawing tools to the front end and graphics post processors to plot the results. SPICE simulators and applications have expanded to analog and digital circuits, microwave devices, and electromechanical systems. top
SPICE is a great tool for learning electronics. You can increase your understanding of circuits as you play and tinker with them. Experiment! Modify the circuit and see what happens! How long does it take? Change a resistor value and see the effect on a circuit in seconds.
Ideally, we would actually build and test actual circuits to understand all of its behaviors. However, you would need breadboards, components and time to wire the circuit. Actual circuits also require expensive equipment like power supplies, signal generators and oscilloscopes. It may be difficult to physically breadboard every circuit you encounter.
You can
spend hours building an actual circuit and only get a simple concept from
it, whereas, SPICE provides the insight in minutes. SPICE
can be your “virtual” breadboard. Even if you have a
short time to spare, you can cover several circuit principles and applications.
top
Basically, SPICE operates like this:
1. Describe a circuit in a text file (“.cir” extension) called a netlist OR draw the circuit using graphical symbols on a schematic page. There are plenty of SPICE netlist files ready to run in the Circuit Collection.
2. Run a simulation. SPICE reads the netlist and then performs the requested analysis: AC, DC, or TRANSIENT RESPONSE. The results are stored in a text output file (“.out” extension) or a binary data file.
3. View the results of the simulation in a text output file ( “.out” ) using a text editor. Most SPICE programs provide a graphical viewer to plot the waveforms stored in the binary data file.
The question arose, should the SPICE circuits for this site be created using a text editor (netlist) or a graphic drawing tool (schematic page). The text editor was chosen. Why? Although, the schematic capture has its advantages, each SPICE vendor has a different drawing interface and file format. This would cause great confusion if you used a version of SPICE different from the one used at this site.
Also, the learning curve for the schematic capture can be steep. Many component characteristics are not visible from the schematic. (Ultimately, the schematic capture program creates a netlist before running a simulation.)
The netlist description of a circuit is simple and fairly consistent for each SPICE vendor
with some variations. The entire circuit and component properties are
visible. Learning the netlist is easy and making changes is fast. You can
create a netlist by drawing the circuit on paper and applying a few simple
rules. (Several books written on SPICE strongly recommend learning the
netlist, even if you decide later to use a schematic capture program.)
top
Simulating and testing your own circuits can be easy.
1. Draw the circuit and number each node.
2. Label each component and give it a value.
3. Create a text file (netlist) listing all of the components and node connections.
4. Decide on the type of analysis you want performed (AC, Transient, DC, Noise, etc.) and include the appropriate statements. Run the simulation and view the results.
You can take advantage of the SPICE Circuit Collection by first looking for a circuit
similar to your own circuit. Copy this SPICE file to a new file. Give it a name
related to your application. (Be sure your new file name has the .CIR
extension.) Then, modify the new file to represent your circuit and run a
simulation. The circuit library provides a ready reference for
you to springboard into simulating your own circuits.
top